window.onload=function(){
 let mydiv=document.getElementById("mydiv");
 console.log(typeof mydiv)
 if(mydiv instanceof HTMLElement){
    console.log("success")
 }   
}